package com.lej.app_interact.search

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lej.app_interact.R
import com.lej.core.utils.load
import com.lej.dataservice.club.bean.interact.CreatorSearchInfo

class InteractSearchAdapter(resId: Int) :
    BaseQuickAdapter<CreatorSearchInfo, BaseViewHolder>(resId) {
    override fun convert(holder: BaseViewHolder, item: CreatorSearchInfo) {
        holder.setText(R.id.tv_name, item.nickname)
        holder.setText(R.id.tv_describe, item.bio)
        val iv = holder.getView<ImageView>(R.id.iv_icon)
        load(item.avatar, R.drawable.ic_default_icon, R.drawable.ic_default_icon, iv)
    }
}